program do_while
  integer :: i
  integer :: j

  i = 1
  do while (i < 11)
    print *, i
    i = i + 1
  end do
  ! Here i = 11
  print *, "i = ", i

  ! integer :: j
  ! Don't decalaration here! 所有的数据声明语句必须在代码块的开始部分，不能在执行语句之后插入新的数据声明。
  do j = 1, 10
    if (mod(j, 2) == 0) then
      cycle  ! Don't print even numbers
    end if
    print *, j
  end do
end program do_while